

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=dark>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/fluid.png">
  <link rel="icon" href="/img/icon/dw.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Memory">
  <meta name="keywords" content="">
  
    <meta name="description" content="🥡 从理论到实践，带你全方位探索高可用系统的优化秘密">
<meta property="og:type" content="article">
<meta property="og:title" content="构建高可用系统：策略之匙，解锁数字世界无障碍之门">
<meta property="og:url" content="http://example.com/2023/10/24/%E6%9E%84%E5%BB%BA%E9%AB%98%E5%8F%AF%E7%94%A8%E7%B3%BB%E7%BB%9F%EF%BC%9A%E7%AD%96%E7%95%A5%E4%B9%8B%E5%8C%99%EF%BC%8C%E8%A7%A3%E9%94%81%E6%95%B0%E5%AD%97%E4%B8%96%E7%95%8C%E6%97%A0%E9%9A%9C%E7%A2%8D%E4%B9%8B%E9%97%A8/index.html">
<meta property="og:site_name" content="Memory&#39;s blog">
<meta property="og:description" content="🥡 从理论到实践，带你全方位探索高可用系统的优化秘密">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/img/artical/sky8.jpg">
<meta property="article:published_time" content="2023-10-24T15:02:16.000Z">
<meta property="article:modified_time" content="2023-11-11T07:13:23.000Z">
<meta property="article:author" content="Memory">
<meta property="article:tag" content="经验">
<meta property="article:tag" content="高可用">
<meta property="article:tag" content="限流">
<meta property="article:tag" content="降级熔断">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="http://example.com/img/artical/sky8.jpg">
  
  
  
  <title>构建高可用系统：策略之匙，解锁数字世界无障碍之门 - Memory&#39;s blog</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.4","typing":{"enable":true,"typeSpeed":100,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":false,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"follow_dnt":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  

  

  

  

  

  

  

  



  
<meta name="generator" content="Hexo 5.4.2"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 75vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>Memory&#39;s blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/links/">
                <i class="iconfont icon-link-fill"></i>
                <span>友链</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/newBG/girl.jpg') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="构建高可用系统：策略之匙，解锁数字世界无障碍之门"></span>
          
        </div>

        
          
  <div class="mt-3">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-author" aria-hidden="true"></i>
        Memory
      </span>
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2023-10-24 23:02" pubdate>
          2023年10月24日 晚上
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          1.1k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          3 分钟
        
      </span>
    

    
    
      
        <span id="leancloud-page-views-container" class="post-meta" style="display: none">
          <i class="iconfont icon-eye" aria-hidden="true"></i>
          <span id="leancloud-page-views"></span> 次
        </span>
        
      
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar category-bar" style="margin-right: -1rem">
    





<div class="category-list">
  
  
    
    
    
    <div class="category row nomargin-x">
      <a class="category-item 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="高可用"
        id="heading-bf5e0264c6fd8ae366c4360908884734" role="tab" data-toggle="collapse" href="#collapse-bf5e0264c6fd8ae366c4360908884734"
        aria-expanded="true"
      >
        高可用
        <span class="list-group-count">(1)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-bf5e0264c6fd8ae366c4360908884734"
           role="tabpanel" aria-labelledby="heading-bf5e0264c6fd8ae366c4360908884734">
        
        
          
          
  <div class="category-post-list">
    
    
  </div>

          
  
    
    
    
    <div class="category-sub row nomargin-x">
      <a class="category-subitem 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="限流"
        id="heading-5c37114753605a538fd4d57cb5534240" role="tab" data-toggle="collapse" href="#collapse-5c37114753605a538fd4d57cb5534240"
        aria-expanded="true"
      >
        限流
        <span class="list-group-count">(1)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-5c37114753605a538fd4d57cb5534240"
           role="tabpanel" aria-labelledby="heading-5c37114753605a538fd4d57cb5534240">
        
        
          
          
  <div class="category-post-list">
    
    
  </div>

          
  
    
    
    
    <div class="category-sub row nomargin-x">
      <a class="category-subitem 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="降级熔断"
        id="heading-029bb078908967129351e38816fc1d52" role="tab" data-toggle="collapse" href="#collapse-029bb078908967129351e38816fc1d52"
        aria-expanded="true"
      >
        降级熔断
        <span class="list-group-count">(1)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-029bb078908967129351e38816fc1d52"
           role="tabpanel" aria-labelledby="heading-029bb078908967129351e38816fc1d52">
        
        
          
          
  <div class="category-post-list">
    
    
  </div>

          
  
    
    
    
    <div class="category-sub row nomargin-x">
      <a class="category-subitem 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="经验"
        id="heading-32a8e000e928e6dc255876d9fc0178b3" role="tab" data-toggle="collapse" href="#collapse-32a8e000e928e6dc255876d9fc0178b3"
        aria-expanded="true"
      >
        经验
        <span class="list-group-count">(1)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-32a8e000e928e6dc255876d9fc0178b3"
           role="tabpanel" aria-labelledby="heading-32a8e000e928e6dc255876d9fc0178b3">
        
        
          
  <div class="category-post-list">
    
    
      
      
        <a href="/2023/10/24/%E6%9E%84%E5%BB%BA%E9%AB%98%E5%8F%AF%E7%94%A8%E7%B3%BB%E7%BB%9F%EF%BC%9A%E7%AD%96%E7%95%A5%E4%B9%8B%E5%8C%99%EF%BC%8C%E8%A7%A3%E9%94%81%E6%95%B0%E5%AD%97%E4%B8%96%E7%95%8C%E6%97%A0%E9%9A%9C%E7%A2%8D%E4%B9%8B%E9%97%A8/" title="构建高可用系统：策略之匙，解锁数字世界无障碍之门"
           class="list-group-item list-group-item-action
           active">
          <span class="category-post">构建高可用系统：策略之匙，解锁数字世界无障碍之门</span>
        </a>
      
    
  </div>

        
      </div>
    </div>
  
        
      </div>
    </div>
  
        
      </div>
    </div>
  
        
      </div>
    </div>
  
</div>


  </aside>


    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">构建高可用系统：策略之匙，解锁数字世界无障碍之门</h1>
            
              <p class="note note-success">
                
                  
                    本文最后更新于：7 个月前
                  
                
              </p>
            
            
              <div class="markdown-body">
                
                <h1 id="破冰"><a href="#破冰" class="headerlink" title="破冰"></a>破冰</h1><ul>
<li>这部分内容，以目前我的实力还远远不够写出技术文章</li>
<li>只好是从<strong>优秀的大佬文章</strong>中学习，积累经验，以期在未来的工作生活中逐渐提高自己的水平</li>
<li>🥇 推荐阅读：（2023/10/25晚）</li>
</ul>
<blockquote>
<h5 id="🔥-限流："><a href="#🔥-限流：" class="headerlink" title="🔥 限流："></a>🔥 限流：</h5><ul>
<li><h5 id="服务限流详解-JavaGuide-Java面试-学习指南"><a href="#服务限流详解-JavaGuide-Java面试-学习指南" class="headerlink" title="服务限流详解 | JavaGuide(Java面试 + 学习指南)"></a><a target="_blank" rel="noopener" href="https://javaguide.cn/high-availability/limit-request.html">服务限流详解 | JavaGuide(Java面试 + 学习指南)</a></h5></li>
<li><h5 id="面试必备：4种经典限流算法讲解-掘金-juejin-cn"><a href="#面试必备：4种经典限流算法讲解-掘金-juejin-cn" class="headerlink" title="面试必备：4种经典限流算法讲解 - 掘金 (juejin.cn)"></a><a target="_blank" rel="noopener" href="https://juejin.cn/post/6967742960540581918">面试必备：4种经典限流算法讲解 - 掘金 (juejin.cn)</a></h5></li>
<li><h5 id="面试官：来，年轻人！请手撸5种常见限流算法！-Java填坑笔记-博客园-cnblogs-com"><a href="#面试官：来，年轻人！请手撸5种常见限流算法！-Java填坑笔记-博客园-cnblogs-com" class="headerlink" title="面试官：来，年轻人！请手撸5种常见限流算法！ - Java填坑笔记 - 博客园 (cnblogs.com)"></a><a target="_blank" rel="noopener" href="https://www.cnblogs.com/liqiangchn/p/14253924.html">面试官：来，年轻人！请手撸5种常见限流算法！ - Java填坑笔记 - 博客园 (cnblogs.com)</a></h5></li>
</ul>
</blockquote>
<blockquote>
<h5 id="👏-异步调用："><a href="#👏-异步调用：" class="headerlink" title="👏 异步调用："></a>👏 异步调用：</h5></blockquote>
<blockquote>
<h5 id="🍜-熔断降级："><a href="#🍜-熔断降级：" class="headerlink" title="🍜 熔断降级："></a>🍜 熔断降级：</h5></blockquote>
<blockquote>
<h5 id="🍖-缓存："><a href="#🍖-缓存：" class="headerlink" title="🍖 缓存："></a>🍖 缓存：</h5><h5 id="🍛-主从分离：-08-数据库优化方案（一）：查询请求增加时，如何做主从分离？-lianglianglee-com-https-learn-lianglianglee-com-专栏-高并发系统设计40问-08-数据库优化方案（一）：查询请求增加时，如何做主从分离？-md"><a href="#🍛-主从分离：-08-数据库优化方案（一）：查询请求增加时，如何做主从分离？-lianglianglee-com-https-learn-lianglianglee-com-专栏-高并发系统设计40问-08-数据库优化方案（一）：查询请求增加时，如何做主从分离？-md" class="headerlink" title="🍛 主从分离：[08 数据库优化方案（一）：查询请求增加时，如何做主从分离？ (lianglianglee.com)](https://learn.lianglianglee.com/专栏/高并发系统设计40问/08  数据库优化方案（一）：查询请求增加时，如何做主从分离？.md)"></a>🍛 主从分离：[08 数据库优化方案（一）：查询请求增加时，如何做主从分离？ (lianglianglee.com)](<a target="_blank" rel="noopener" href="https://learn.lianglianglee.com/%E4%B8%93%E6%A0%8F/%E9%AB%98%E5%B9%B6%E5%8F%91%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A140%E9%97%AE/08">https://learn.lianglianglee.com/专栏/高并发系统设计40问/08</a>  数据库优化方案（一）：查询请求增加时，如何做主从分离？.md)</h5></blockquote>
<blockquote>
<h5 id="🥣-分库分表：-09-数据库优化方案（二）：写入数据量增加时，如何实现分库分表？-lianglianglee-com-https-learn-lianglianglee-com-专栏-高并发系统设计40问-09-数据库优化方案（二）：写入数据量增加时，如何实现分库分表？-md"><a href="#🥣-分库分表：-09-数据库优化方案（二）：写入数据量增加时，如何实现分库分表？-lianglianglee-com-https-learn-lianglianglee-com-专栏-高并发系统设计40问-09-数据库优化方案（二）：写入数据量增加时，如何实现分库分表？-md" class="headerlink" title="🥣 分库分表：[09 数据库优化方案（二）：写入数据量增加时，如何实现分库分表？ (lianglianglee.com)](https://learn.lianglianglee.com/专栏/高并发系统设计40问/09  数据库优化方案（二）：写入数据量增加时，如何实现分库分表？.md)"></a>🥣 分库分表：[09 数据库优化方案（二）：写入数据量增加时，如何实现分库分表？ (lianglianglee.com)](<a target="_blank" rel="noopener" href="https://learn.lianglianglee.com/%E4%B8%93%E6%A0%8F/%E9%AB%98%E5%B9%B6%E5%8F%91%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A140%E9%97%AE/09">https://learn.lianglianglee.com/专栏/高并发系统设计40问/09</a>  数据库优化方案（二）：写入数据量增加时，如何实现分库分表？.md)</h5><ul>
<li>推荐看公众号：<strong>分库分表带来了什么问题？</strong>（苏三说技术）<strong>（2023/11/11早）</strong></li>
</ul>
</blockquote>
<h1 id="精髓所在"><a href="#精髓所在" class="headerlink" title="精髓所在"></a>精髓所在</h1><h2 id="思考"><a href="#思考" class="headerlink" title="思考"></a>思考</h2><ul>
<li>今天是 2024 年元旦，记录一下我对高并发系统的理解吧</li>
</ul>
<h3 id="设计目标"><a href="#设计目标" class="headerlink" title="设计目标"></a>设计目标</h3><ul>
<li>高性能、高可用、可扩展</li>
</ul>
<h3 id="设计方法"><a href="#设计方法" class="headerlink" title="设计方法"></a>设计方法</h3><ul>
<li>缓存、异步、横向扩展</li>
</ul>
<h2 id="缓存"><a href="#缓存" class="headerlink" title="缓存"></a>缓存</h2><h3 id="Redis"><a href="#Redis" class="headerlink" title="Redis"></a>Redis</h3><h3 id="CDN-内容分发网络"><a href="#CDN-内容分发网络" class="headerlink" title="CDN 内容分发网络"></a>CDN 内容分发网络</h3><h2 id="异步"><a href="#异步" class="headerlink" title="异步"></a>异步</h2><h3 id=""><a href="#" class="headerlink" title=""></a></h3><h2 id="横向扩展"><a href="#横向扩展" class="headerlink" title="横向扩展"></a>横向扩展</h2><h3 id="一体化服务架构"><a href="#一体化服务架构" class="headerlink" title="一体化服务架构"></a>一体化服务架构</h3><h3 id="分布式服务架构"><a href="#分布式服务架构" class="headerlink" title="分布式服务架构"></a>分布式服务架构</h3><h2 id="分库分表"><a href="#分库分表" class="headerlink" title="分库分表"></a>分库分表</h2><h3 id="分库分表带来什么问题？"><a href="#分库分表带来什么问题？" class="headerlink" title="分库分表带来什么问题？"></a>分库分表带来什么问题？</h3><blockquote>
<p>单表数据量过大，查询性能变差 -&gt; <strong>水平分表</strong> -&gt; 分片键 -&gt; <strong>根据 id 范围</strong>（写热点问题）-&gt; <strong>根据 id 取模</strong>（数据迁移）</p>
<p>-&gt; <strong>两者结合</strong>：在 id 范围分表中，引入取模分表（数据量增大，查询普通索引列 / 非分片字段，<strong>读扩散问题</strong>）</p>
<p>-&gt; 建立新表，以该<strong>普通索引</strong>为分片键：查询该字段所在 ids，再拿 ids 查询原表（迅速定位，<strong>减少查询次数</strong>）</p>
<p>-&gt;👆 <strong>倒排索引</strong>思想：接入 ES，使用 canal 监听 MySQL binlog 日志变更，<strong>实时同步数据</strong>到 ES</p>
<p>-&gt; <strong>tidb</strong>：分布式数据库，根据 id 范围分片、普通索引分片<strong>（2023/11/11早）</strong></p>
</blockquote>
<h2 id="限流"><a href="#限流" class="headerlink" title="限流"></a>限流</h2><blockquote>
<p>🔥 什么是限流？ <strong>（2023/11/11午）</strong></p>
<p><strong>限流</strong>，又称<strong>流量控制</strong>。限制到达系统的并发请求数，是的系统能够正常地处理部分用户的请求，用来保证系统的稳定性。限流会不可避免的造成用户请求变慢或者被拒的情况，从而影响用户体验</p>
<p>所以说，限流是需要在<strong>用户体验</strong>和<strong>系统稳定性</strong>之间做平衡的</p>
<p><strong>限流的本质</strong>是：因为后端处理能力有限，需要截掉超过处理能力之外的请求，亦或是为了均衡客户端对服务器端资源的公平调用，防止一些客户端饿死</p>
</blockquote>
<h3 id="限流算法"><a href="#限流算法" class="headerlink" title="限流算法"></a>限流算法</h3><h4 id="计数限流"><a href="#计数限流" class="headerlink" title="计数限流"></a>计数限流</h4><h4 id="固定窗口限流"><a href="#固定窗口限流" class="headerlink" title="固定窗口限流"></a>固定窗口限流</h4><h4 id="滑动窗口限流"><a href="#滑动窗口限流" class="headerlink" title="滑动窗口限流"></a>滑动窗口限流</h4><h4 id="漏桶算法"><a href="#漏桶算法" class="headerlink" title="漏桶算法"></a>漏桶算法</h4><h4 id="令牌桶算法"><a href="#令牌桶算法" class="headerlink" title="令牌桶算法"></a>令牌桶算法</h4><h1 id="亮点集锦"><a href="#亮点集锦" class="headerlink" title="亮点集锦"></a>亮点集锦</h1>
                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E9%AB%98%E5%8F%AF%E7%94%A8/" class="category-chain-item">高可用</a>
  
  
    <span>></span>
    
  <a href="/categories/%E9%AB%98%E5%8F%AF%E7%94%A8/%E9%99%90%E6%B5%81/" class="category-chain-item">限流</a>
  
  
    <span>></span>
    
  <a href="/categories/%E9%AB%98%E5%8F%AF%E7%94%A8/%E9%99%90%E6%B5%81/%E9%99%8D%E7%BA%A7%E7%86%94%E6%96%AD/" class="category-chain-item">降级熔断</a>
  
  
    <span>></span>
    
  <a href="/categories/%E9%AB%98%E5%8F%AF%E7%94%A8/%E9%99%90%E6%B5%81/%E9%99%8D%E7%BA%A7%E7%86%94%E6%96%AD/%E7%BB%8F%E9%AA%8C/" class="category-chain-item">经验</a>
  
  

  

  

  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/%E7%BB%8F%E9%AA%8C/">#经验</a>
      
        <a href="/tags/%E9%AB%98%E5%8F%AF%E7%94%A8/">#高可用</a>
      
        <a href="/tags/%E9%99%90%E6%B5%81/">#限流</a>
      
        <a href="/tags/%E9%99%8D%E7%BA%A7%E7%86%94%E6%96%AD/">#降级熔断</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>构建高可用系统：策略之匙，解锁数字世界无障碍之门</div>
      <div>http://example.com/2023/10/24/构建高可用系统：策略之匙，解锁数字世界无障碍之门/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>Memory</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2023年10月24日</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>更新于</div>
          <div>2023年11月11日</div>
        </div>
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2023/10/25/%E6%8E%A2%E7%B4%A2%20Win10%20%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%EF%BC%8C%E8%A7%A3%E9%94%81%E9%9A%90%E8%97%8F%E7%9A%84%E7%A7%98%E5%AF%86%E5%92%8C%E4%B9%90%E8%B6%A3%EF%BC%81/" title="探索Win10操作系统，解锁隐藏的秘密和乐趣！">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">探索Win10操作系统，解锁隐藏的秘密和乐趣！</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2023/10/24/Java%E7%BB%88%E6%9E%81%E5%86%92%E9%99%A9%EF%BC%9A%E4%BB%8E%E5%9F%BA%E7%A1%80%E5%88%B0%E5%AE%9E%E6%88%98%EF%BC%8C%E8%A7%A3%E9%94%81Java%E7%9A%84%E7%A5%9E%E7%A7%98%E5%AF%86%E7%A0%81/" title="Java终极冒险：从基础到实战，解锁Java的神秘密码">
                        <span class="hidden-mobile">Java终极冒险：从基础到实战，解锁Java的神秘密码</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
  
  
    <article id="comments">
      

    </article>
  


          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.fluid-dev.com/docs/guide/" target="_blank" rel="nofollow noopener"> <span>Memory | 个人文档站点</span> </a>
<i class="iconfont icon-love"></i> <a href="https://hexo.fluid-dev.com/docs/guide/" target="_blank" rel="nofollow noopener"> <span>配置指南 | Hexo Fluid 用户手册</span> </a>   
    </div>
  
  
    <div class="statistics">
  
  

  
    
      <span id="leancloud-site-pv-container" style="display: none">
        总访问量 
        <span id="leancloud-site-pv"></span>
         次
      </span>
    
    
      <span id="leancloud-site-uv-container" style="display: none">
        总访客数 
        <span id="leancloud-site-uv"></span>
         人
      </span>
    
    

  
</div>

  
  
    <!-- 备案信息 ICP for China -->
    <div class="beian">
  <span>
    <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
      京ICP证123456号
    </a>
  </span>
  
    
      <span>
        <a
          href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12345678"
          rel="nofollow noopener"
          class="beian-police"
          target="_blank"
        >
          
            <span style="visibility: hidden; width: 0">|</span>
            <img src="/img/police_beian.png" alt="police-icon"/>
          
          <span>京公网安备12345678号</span>
        </a>
      </span>
    
  
</div>

  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>







  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.18.2/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>

  <script defer src="/js/leancloud.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
